import request from "@/api";
import type {
    rpDirDataType, rpResultParams, rpResultData, rpDataItemTableData,
    rpDataItemTableDataParams
} from "@/api/reportCom/type";
import type {resData} from "@/api/goloalType";
import {ListByReport, ListByReportParams} from "@/api/reportCom/type";

//文件菜单

export const getRpAndDirList = () => request.get<any, resData<rpDirDataType[]>>('/reportApi/report/reportfile/report/and/dir')

//文件列表
export const listByReport = (params:ListByReportParams) => request.get<any, resData<ListByReport>>(`/reportApi/report/reportfile/list_by_report`,{params: params})

//删除文件
export const batchRemoveFile = (params:{ids:number[]}) => request.post<any, resData<any>>(`/reportApi/report/reportfile/batch_remove_file`,{...params})

//上传文件
export const uploadReportFile = (params:FormData) => request.post<any, resData<any>>(
    `/reportApi/report/reportfile/upload_report_file`, params,{headers:{'Content-Type': 'multipart/form-data'}})


